
import { NextResponse } from 'next/server';


const endpoint = process.env.NEXT_PUBLIC_API_ENDPOINT; 
export async function GET() {
    console.log(endpoint);
  try {
  
    const response = await fetch(endpoint+"/api/collections/tatoo_category/records");
    const data = await response.json();
    return NextResponse.json(data);
  } catch (error) {
    console.error('Error fetching category data:', error);
    return NextResponse.error();
  }
}